The present invention relates to a circuit simulator interface for evaluating expressions defining output parameters describing behavior of subcircuits of a simulated circuit, wherein the expressions combine primitive circuit parameter values generated by the simulator.
A "netlist" input to a circuit simulator may describe a circuit to be simulated by identifying primitive electronic devices included in the circuit and indicating how they are interconnected. "Primitive" electronic devices such as resistors, capacitors, inductors and transistors have operating characteristics known to the circuit simulator. Based on the circuit defined by the netlist, and on the known characteristics of the primitive devices forming the circuit, the circuit simulator simulates the operation of the circuit by generating a data file containing various primitive output parameter values describing circuit behavior. The primitive output parameter values may include, for example, voltages at various nodes of primitive devices and currents through branches of the primitive devices.
A circuit simulator may accept an input netlist defining a circuit hierarchically. Portions of a hierarchical netlist may define various subcircuit models formed by primitive electronic devices known to the circuit simulator. Other portions of the netlist may describe models of higher level subcircuits formed b combinations of primitive electronic devices and "instances" of lower level subcircuit models defined elsewhere in the netlist. Before executing a simulation, a circuit simulator automatically decomposes a hierarchical netlist description of a circuit into a single level representation employing only primitive electronic devices.
Although the netlist description may be hierarchically defined, a circuit simulator nonetheless produces primitive output parameter values relating only to primitive devices at the lowest level of circuit definition. But users are often interested in values of certain parameters describing behavior of higher level subcircuits of hierarchically defined circuit, and such parameters may not be directly included in the simulator output. For example, a user may wish to determine an output current produced by an amplifier. When the amplifier is a user-defined subcircuit of primitive devices, the simulator does not generate an output parameter indicating the amplifier output current. However, the amplifier output current is equal to a sum of certain component currents internal to the amplifier and the circuit simulator may provide some of these component currents as primitive output parameter values. However, the user may have to calculate other component currents from primitive parameter values indicating voltage drops across one or more devices of known impedance within the amplifier. Thus, to determine the amplifier output current, the user must determine circuit nodes and branches and impedances of interest, consult the simulator output data to obtain an appropriate set of primitive parameter values, and then perform the necessary calculations. Such a procedure can be tedious, difficult, and subject to error.